<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <button @click="search()">查询</button><!-- v-on的简写 -->

        <p>你要查询的是:{{searchMap.keyWord}}</p>
        <p><a v-bind:href="result.site" target="_blank">{{result.title}}</a></p>

    </div>
    <script src="vue.min.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                searchMap:{
                    keyWord:'尚硅谷',
                   
                },
                result:{}
            },
            methods:{
                    search(){
                        console.log("search...")
                        this.result={
                            title:"尚硅谷",
                            site:"http://www.atguigu.com"
                        }
                    }
                }
        })
    </script>
</body>

</html>